<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>广东省传播平台-项目库查看页</title>
		<link rel="stylesheet" type="text/css" href="css/common.css" />
		<link rel="stylesheet" type="text/css" href="css/tag.css" />
		<script type="text/javascript" src="js/jquery-1.7.2.js"></script>
		<script type="text/javascript" src="js/My97DatePicker/WdatePicker.js"></script>
		<link type="text/css" rel="stylesheet"
			href="<%=request.getContextPath()%>/css/zTreeStyle/zTreeStyle.css" />
		<link type="text/css"
			href="<%=request.getContextPath()%>/js/jquery-ui-1.8.21.custom/css/smoothness/jquery-ui-1.8.21.custom.css"
			rel="stylesheet" />
		<script type="text/javascript"
			src="<%=request.getContextPath()%>/js/jquery-1.7.2.js"></script>
		<script type="text/javascript"
			src="<%=request.getContextPath()%>/js/jquery.ztree.core-3.1.js"></script>
		<script type="text/javascript"
			src="<%=request.getContextPath()%>/js/jquery.ztree.excheck-3.1.min.js"></script>
		<script type="text/javascript"
			src="<%=request.getContextPath()%>/js/jquery-ui-1.8.21.custom/js/jquery-ui-1.8.21.custom.min.js"></script>
		<script type="text/javascript"
			src="<%=request.getContextPath()%>/js/public.js"></script>
		<style>
#organizesTree {
	margin-top: 10px;
	border: 1px solid #617775;
	background: #f0f6e4;
	min-width: 180px;
	max-height: 400px;
	overflow-y: scroll;
	overflow-x: auto;
}

#popupDialog div.title table {
	width: 100%;
	color: black;
}

#popupDialog .title {
	border-bottom: 1px solid gray;
	padding-bottom: 5px;
}

#popupDialog .body {
	margin-top: 10px;
	text-align: center;
}

#popupDialog .body div table {
	border: 1px solid gray;
	margin-right: 5px;
}

#popupDialog .body div table tr th,#popupDialog .body div table tr td {
	border: 1px solid gray;
	height: 30px;
}

#popupDialog table {
	border-collapse: collapse;
}
</style>
		<script type="text/javascript">
		
		$(document).ready(function() {
    		//$.ajaxSetup({
                ///error: function (x, e) {
                    //alert('服务运行时错误,请刷新后重试!');
                    //return false;
                //}
           // });
    		
			//	修改资源状态弹出框
    		$("#popupDialog").dialog({
    			autoOpen : false,
    			modal : true,
    			width : 1200,
    			height : 500,
    			title : "当前状态：<font color='red'>呈批中</font>",
    			resizable : false,
    			show : "blind",
    			hide : "slide",
    			buttons : {
    				"确定修改" : function() {
    				    document.updateForm.action = "modCastStatus.action";
    				    document.updateForm.submit();
    				    //$("#popupDialog form")[0].submit();
    					$(this).dialog("close");
    				},
    				"取消修改" : function() {
    					$(this).dialog("close");
    				}
    			}
    		});
    		//	资源状态展示详细信息
    		$("img.showDetail").click(function() {
    			var right = $(this).parent().parent().parent().parent().parent().next();
    			right.css("margin-top", $(this).parent()[0].offsetTop);
    			var visible = $(this).parents(".content_left").next().is(":visible");
    			var detailImg = $(this).attr("src");
    			$("img.showDetail").attr("src", "images/status/arrow_right.gif");
    			if (detailImg == "images/status/arrow_right.gif") {
    				visible = false;
    			}
    			if (visible) {
    				$(this).attr("src", "images/status/arrow_right.gif");
    				$('#detail_Med').hide();
    			} else {
        			try{
	    				var params = {'idForMed' : $(this).attr('name'),'projMedId':$(this).attr('title'),'curStatus':'',time : new Date().getTime()};
	    				$.getJSON("detailForMedium.action", params , function(data){
	    					//$('#detail_Med').empty();
	    					if(undefined!= data && null!=data)
					        {
		    					//alert(data);
		    					$('#value1').text(data.mediasumm.mediaName);
		    					$('#value2').text(data.mediumStandard);
		    					$('#value3').text(data.mediumStyle);
		    					$('#value4').text(data.mediumColumn);
		    					$('#value5').text(data.mediumPage);
		    					$('#value6').text(data.mediumPosition);
		    					$('#value7').text(data.mediumPrice);
		    					$('#value8').text(data.mediumAbility);
					        }
	    					else
	    					{
	    						alert('服务运行时错误,请刷新后重试!');
	                            return false;
		    			     }
	    					
	    		        });
        			}
        			catch(ex)
        			{
        				alert('服务运行时错误,请刷新后重试!');
                        return false;
            	    }
    				$(this).attr("src", "images/status/arrow_left.gif");
    				$('#detail_Med').show();
    				//$(this).parent().parent().parent().parent().parent().next().show();
    			}
    		});

    		$("img.delete").click(function() {
				if (currentStatus == 4) {
					alert("该条记录已完成投放不可删除！");
					return;
				}
				if(confirm('确实要删除该条记录吗？'))
				{
					var proMedId = $(this).attr("name");
					$('#projMedId').val(proMedId);
					$('#castDetailstatus').val(2);
					document.updateForm.action="deleteCastDetail.action";
					document.updateForm.submit();
				}
				else
				{
					return false;
				}
				
			});
    		
    		
        });	
        
        var currentStatus = -1;

		function openDialog(statusName,projId,state,city) {
			var userCity = "${logUser.cityName}";
			//alert(userCity);
			//alert(city);
			if(userCity!=city)
			{
				alert('您无权限查看该状态');
				return;
		    }

			currentStatus = state;
			var selectedIndex = 0;
			if (state == 4) {
				$("select[name='newStatus']").children().remove();
				$("select[name='newStatus']").append("<option value='4'>完成投放</option><option value='5'>完成结算</option>");
			} else if (state == 5 || state == 6) {
				alert("此状态不可修改！");
				return;
			} else {
				$("select[name='newStatus']").children().remove();
				$("select[name='newStatus']").append("<option value='1'>预占</option>");
				$("select[name='newStatus']").append("<option value='2'>呈批中</option>");
				$("select[name='newStatus']").append("<option value='3'>占用</option>");
				$("select[name='newStatus']").append("<option value='4'>完成投放</option>");
				$("select[name='newStatus']").append("<option value='5'>完成结算</option>");
				$("select[name='newStatus']").append("<option value='6'>中止</option>");
				selectedIndex = parseInt(state)-1;
			}
			($("select[name='newStatus']")[0]).selectedIndex = selectedIndex;
			
			$("#popupDialog .showDetail").attr("src", "images/status/arrow_right.gif");
			$("#popupDialog .content_right").hide();
			
			//var projId = $(this).attr('id');
			//var curState = $(this).attr('title');
			//alert(projId);
			//alert(curState);
			var time = new Date().getTime();
			try
			{
				$.getJSON("getCurCastsForProj.action", {projectId : projId, curStatus : state, time: time}, function(data){
					if(undefined!= data && null!=data)
					{
						//alert(data);
						$("#recordTable tr:not(:eq(0))").remove();
						$.each(data.curStatusList, function(i){
							$('#checkId_').val(data.curStatusList[i].proMedId);
							$('#del_').attr('name',data.curStatusList[i].proMedId);
							$('#detail_').attr('name',data.curStatusList[i].idForMed);
							$('#number_').text(i+1);
							var medname = data.curStatusList[i].mediumName;
							$('#name_').text(medname.substring(0,10));
							$('#name_').attr({title : data.curStatusList[i].mediumName});
						    $('#total_').text(data.curStatusList[i].mediumTotalPrice);
						    
							var newRecord = $('#record_single').clone(true);
							
							newRecord.children('td').children('input')[0].id = "checkId_"+i;
							newRecord.children('td')[1].id = "number_"+i;
							//alert(newRecord.children('td')[1].id);
							newRecord.children('td')[2].id = "name_"+i;
							newRecord.children('td')[3].id = "total_"+i;
							newRecord.children('td').children('img')[0].id = "del_"+i;
							newRecord.children('td').children('img')[1].id = "detail_"+i;
							newRecord.children('td').children('img')[1].title = data.curStatusList[i].proMedId;
							
							newRecord.children('td').children('img')[1].style. cursor = "hand";
							newRecord.children('td').children('img')[0].style. cursor = "hand";
							//alert(newRecord.children('td').children('img')[0].id)
							//alert()
							//newRecord.children(':eq(0)');
							//alert(newRecord.children(':eq(0)'));
							//$('#recordTable').append(newRecord);
						    //相当于循环输出json数组中数据
						    //alert(newRecord[0]);
						    //alert(newRecord.html());
							$('#recordTable').append(newRecord);
							///alert(i);
							//alert($('#checkId_'+i).val());
						});
						//alert($('#sum_table').length);
						$('#totals').text(data.sumCount);
						$('#recordTable').append($('#sum_table').clone());
				    }
					else
					{
						alert('服务运行时错误,请刷新后重试!');
                        return false;
				    }
					$("#popupDialog").dialog({title : "当前状态：<font color='red'>"+statusName+"</font>"});
					$("#popupDialog").dialog("open");
					$("#projectID").val(projId);
									
		        });
			}
			catch(ex)
			{
				alert('服务运行时错误,请刷新后重试!');
                return false;
		    }
			
		}


		
	function pageSub(currentPage) 
	{
		var reg = /^\d*?$/;
		var total = ${page.totalPages};
		if(reg.test(currentPage)){
		 	if(currentPage > total){
		 		currentPage = total;
			 }
			 $("#currentPage").val(currentPage);
			 $('#form1').submit();
		} else {
			alert("请输入数字!");
		}
	}
	function doDel(projectId)
	{
		if (confirm('确定要删除该条记录吗？'))
		{
			$("#projectId").val(projectId);
			$('#form1').attr("action", "proDel.action");
			$('#form1').submit();
		}
	}
	
	function doView(projectId)
	{
		$("#projectId").val(projectId);
		$('#form1').attr("action", "proDetail.action");
		$('#form1').submit();
	}
	
	function doEdit(projectId)
	{
		$("#projectId").val(projectId);
		$('#form1').attr("action", "modInit.action");
		$('#form1').submit();
	}
	
	function regcheck()
	{
	   var myReg = /^[^@\/\'\\\"#$%_&\^\*<>]+$/;
       var contractNum = /^[\w-\s]+$/;
       var contractWord = /^\x00-\xff/;
       var txt=new RegExp("[ ,\\`,\\~,\\!,\\@,\#,\\$,\\%,\\^,\\+,\\*,\\&,\\\\,\\/,\\?,\\|,\\:,\\.,\\<,\\>,\\{,\\},\\(,\\),\\'',\\;,\\=,\",\\_,\\%]");
       
       //var projectid = document.getElementById('proId').value;
       //var keyword = document.getElementById('keyword').value;
       var keyword = $.trim(document.getElementById("keyword").value);

	    if(txt.test(keyword))
	    {
	        alert("搜索关键字不能包含特殊字符！");
			return false;
	    }
	    return true;
	}
	
	function checkValue()
	{
	    if($("#searchType").val()=="0" && $("#keyword").val()!="" && $("#keyword").val()!="输入关键字检索")
	    {
	       alert('请选择搜索关键字检索类型');
	       return false;
	    }
	    else if ($("#searchType").val()!="0" && $("#keyword").val()=="输入关键字检索")
	    {
	       //alert('555');
	       $("#keyword").val('');
	    }
	    return true;
	}
	function submitForm()
	{				
		//提交
		if(checkValue()&& regcheck())
		{
		   $('#form1').submit();
		}
		else
		{
		   return false;
		}
		
	}
	
	function changeKeyword()
	{				
		//提交
		$('#keyword').val('');
	}
			
	$(function(){
        //selectNav('nav3');
        var searchType = '${searchType}';

        if(searchType == null || searchType == '')
        {
           searchType = '0';
           $("#keyword").val("输入关键字检索");
        }
        
        $("#searchType").val(${searchType});
    });
    
    //重置
	    function resetFun()
	    {
            var myDate = new Date();
            var years = myDate.getYear();
	        document.getElementById("arrangeTime").value="";
			document.getElementById("typelist").value=""; 
			document.getElementById("citylist").value="";  
			document.getElementById("orgID").value="";
			document.getElementById("showOrganize").value="--部门科室--";
			document.getElementById("searchType").value="0";
			document.getElementById("keyword").value="输入关键字检索";
			document.getElementById("citylist").value="${logUser.usercity}";
			getOrganization("${logUser.usercity}");
	     }


		

		function gotoAddcast()
		{
		   $('#castDetailstatus').val(1);
		   document.updateForm.action="initCastDetailHome.action";
		   document.updateForm.submit();
		}
	</script>
	</head>

	<body
		onkeydown="if(event.keyCode==13) document.getElementById('searchbt').click();">
		<!-- 顶栏start -->
		<jsp:include page="../common/top.jsp"></jsp:include>
		<!-- 顶部end -->

		<div id="main">
			<div class="body">
				<!-- 导航菜单 -->
				<jsp:include page="../common/nav.jsp"></jsp:include>

				<!-- 主体 -->
				<div class="main_body">
					<form id="form1" action="proQuery.action?opflag=search"
						method="post">
						<input type="hidden" id="currentPage" name="currentPage" />
						<input type="hidden" id="projectId" name="projectId" />
						<table class="condition bg1"
							style="width: 100%; font-size: 14px; font-weight: bold; color: #000000;"
							align="center">
							<tr>
								<td width="8%" style="height: 40px; text-align: right;">
									<label>
										排期月份：
									</label>
								</td>
								<td width="15%" style="height: 40px;">
									<input type="text" id="arrangeTime" class="text Wdate"
										name="arrangeTime" onfocus="WdatePicker({dateFmt:'yyyy-M'})"
										value="${arrangeTime}" />
								</td>
								<td width="15%" style="height: 40px;">
									<s:select id="typelist" name="project.projectType"
										list="typelist" listKey="id" listValue="datavalue"
										headerKey="" headerValue="--项目类型--"></s:select>
								</td>
								<td width="15%" style="height: 40px;">
									<s:select id="citylist" name="project.city" list="citylist"
										listKey="id" listValue="datavalue"
										onchange="getOrganization();"></s:select>
								</td>
								<td width="15%" style="height: 40px;">
									<input type="hidden" id="orgID" name="projectOrganize"
										value="${projectOrganize}" />
									<input id="showOrganize" name="text2" type="text" class="text"
										style="color: #0078B6"
										onkeydown="if(event.keyCode==8) return false;"
										onclick="showMenu('showOrganize', 'organizeContent');"
										value="${organizeValue}" readonly="readonly" />
								</td>
								<td width="30%" style="height: 40px;">
									&nbsp;&nbsp;&nbsp;
								</td>
							</tr>
							<tr>
								<td style="height: 40px; width: 8%; text-align: right;">
									<label>
										关键字：
									</label>
								</td>
								<td style="height: 40px; width: 15%;">
									<select name="searchType" id="searchType" onchange="">
										<option value="0">
											--关键字检索类型--
										</option>
										<option value="1">
											按项目名称
										</option>
										<option value="2">
											按项目负责人
										</option>
									</select>
									&nbsp;&nbsp;
								</td>
								<td style="height: 40px; width: 15%;">
									<input name="keyword" id="keyword" type="text" class="text"
										value="${keyword}"
										onfocus="Changeinput('keyword',1,'输入关键字检索')"
										onblur="Changeinput('keyword',0,'输入关键字检索')" />
								</td>
								<td style="height: 40px; width: 15%; text-align: left;"
									colspan="2">
									<input type="button" id="searchbt" class="btn-title" value="搜索"
										onclick="submitForm();" />
									&nbsp;&nbsp;&nbsp;
									<input type="button" class="btn-title" value="重置"
										onclick="resetFun();" />
								</td>
								<td style="height: 40px; text-align: right;">
									<input type="button" class="btn-title" value="新增"
										onclick="window.location.href='addInit.action'" />
									&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
								</td>
							</tr>
						</table>
					</form>

					<div id="list_div">
						<table class="table_list" width="100%">
							<tr class="bg">
								<th>
									项目名称
								</th>
								<th>
									项目类型
								</th>
								<th>
									项目描述
								</th>
								<th>
									项目状态
								</th>
								<!-- <th>费用类型</th>
						<th>费用子类</th>
						<th>预算额度</th> 
						<th>开始时间</th>
						<th>排期月份</th>-->
								<th>
									归属地市
								</th>
								<th>
									部门科室
								</th>
								<th>
									项目负责人
								</th>
								<th>
									操作
								</th>
							</tr>
							<s:iterator status="stu" value="projectList" id="pro">
								<tr>
									<td width="20%" title="${projectName}">
										<s:if test="#pro.projectName.length()>10">
						${fn:substring(projectName, 0, 10)}
						</s:if>
										<s:else>
											<s:property value="#pro.projectName" />
										</s:else>
									</td>
									<td width="10%">
										${projectType}
									</td>
									<td width="20%" title='${projectDesciption}'>
										<s:if test="#pro.projectDesciption.length()>10">
						${fn:substring(projectDesciption, 0, 20)}
						</s:if>
										<s:else>
											<s:property value="#pro.projectDesciption" />
										</s:else>
									</td>
									<td width="10%">
										<a href="javascript:openDialog('${pro.proStatusName}','${pro.projectId}','${pro.proCurStatus}','${pro.city}');" style="text-decoration:underline;">
										<s:property value="#pro.proStatusName" />
										</a>
									</td>
									<!--<td>费用类型</td>
						<td>费用子类</td>
						<td>89,000</td> 
						<td><fmt:formatDate value="${arrangeTime}" pattern="yyyy-MM"/></td>-->
									<!-- <td width="5%"><fmt:formatDate value="${arrangeTime}" pattern="yyyy-M"/></td> -->
									<td width="10%">
										${city}
									</td>
									<td width="10%" title="${projectDepartment}">
										<s:if test="#pro.projectDepartment.length()>10">
						${fn:substring(projectDepartment, 0, 15)}
						</s:if>
										<s:else>
											<s:property value="#pro.projectDepartment" />
										</s:else>
									</td>
									<td width="10%">
										${projectManagerName}
									</td>
									<td>
										<s:if test="#session.logUser.cityName == #pro.city">
											<a href="#" title="编辑" onclick="doEdit('${projectId}');">
												<img align="middle" src="images/modify.gif" /> </a>
										</s:if>
										<a href="#" title="详情" onclick="doView('${projectId}');">
											<img src="<%=request.getContextPath()%>/images/detail.gif"
												alt="详情" /> </a>
										<s:if test="#session.logUser.cityName == #pro.city">
											<a href="#" title="删除" onclick="doDel('${projectId}');">
												<img align="middle" src="images/delete.gif" /> </a>
										</s:if>
									</td>
								</tr>
							</s:iterator>
						</table>
						<!-- 分页start -->
						<jsp:include page="/jsp/common/page.jsp"></jsp:include>
						<!-- 分页end -->
					</div>
				</div>
			</div>
		</div>
		<!-- 顶部end -->


		<!-- 底部start -->
		<div id="bottom">
			<div class="body">
				<label>
					版权所有&nbsp;&nbsp;&nbsp;&nbsp;2012东莞移动
				</label>
			</div>
		</div>
		<!-- 底部end -->
		<div id="organizeContent" class="menuContent"
			style="display: none; position: absolute;">
			<ul id="organizesTree" class="ztree" style="margin-top: 0;"></ul>
		</div>
		<script type="text/javascript">
	
	//获取后台数据显示组织架构
	var organizes =${tree};
	
	//组织架构初始化
	var organizeSetting = {
		view : {
			dblClickExpand : false
		},
		data : {
			simpleData : {
				enable : true
			}
		},
		callback : {
			beforeClick : beforeClick,
			onClick : organizeOnClick
		}
	};
		//页面加载
	$(function() {
		
		//设置组织架构弹出框
		$.fn.zTree.init($("#organizesTree"), organizeSetting, organizes);
	});

	//点击事件
	function beforeClick(treeId, treeNode) {
		var check = (treeNode && !treeNode.isParent);
		if (!check)
			alert("请选择下级节点！");
		return check;
	}

	//组织架构点击事件
	function organizeOnClick(e, treeId, treeNode) {
		var zTree = $.fn.zTree.getZTreeObj("organizesTree"), nodes = zTree.getSelectedNodes(), v = "";
		nodes.sort(function compare(a, b) {
			return a.id - b.id;
		});
		for ( var i = 0, l = nodes.length; i < l; i++) {
			v += nodes[i].name + ",";
		}
		if (v.length > 0)
			v = v.substring(0, v.length - 1);
		var orgNameObj = $("#showOrganize");
		orgNameObj.attr("value", v);
		//设置隐藏域中组织编号  
		$('#orgID').val(treeNode.id);
		hideMenu('organizeContent');
	}

	//隐藏组织架构
	function hideMenu(divId) {
		$("#" + divId).fadeOut("fast");
		$("body").unbind("mousedown", {
			tempDiv : divId
		}, onBodyDown);
	}

	//组织架构弹出窗
	function showMenu(objId, divId) {
		var cityObj = $("#" + objId);
		var cityOffset = $("#" + objId).position();
		$("#" + divId).css( {
			left : cityOffset.left + "px",
			top : cityOffset.top + cityObj.outerHeight() + "px"
		}).slideDown("fast");
		$("body").bind("mousedown", {
			tempDiv : divId
		}, onBodyDown);
	}
		//鼠标点击别的地方隐藏弹出属性菜单
	function onBodyDown(event) {
		var divId = event.data.tempDiv;
		if (!(event.target.id == "showOrganize" || $(event.target).parents(
				"#" + divId).length > 0)) {
			hideMenu(divId);
		}
	}
		//参数非空验证
	function paramIsNull(paramId){
		var temp = $('#'+paramId).val();
		if(null == temp || temp=='')
		{
			return false;
		}
		else{
			//文本框去左右空格重新赋值
			$('#'+paramId).val($.trim(temp));
			return true;
		}
	} 
	
	function getOrganization(city)
	{
	   //alert('99');
	   document.getElementById("orgID").value="";
	   document.getElementById("showOrganize").value="--部门科室--";
	   var value = city;
	   if(value == null || value == '')
	   {
	      value = $("#citylist").val();
	   }
	   //alert(value);
	   if(null!=value&&value!='')
	   {
	      //alert('88');
          var url = encodeURI(encodeURI('getProOrganization.action?citycode=' + value));
          $.ajax(
          {
        	url : url,
			type : "POST",
			dataType: "json",
			cache : false,
			success : function(message) {
			    var items = eval(message);
			    if(null != items){
			    	var orgFlag = items[0].flagstr;
			    	var treeObj = $.fn.zTree.getZTreeObj("organizesTree");
			    	var node_remove = treeObj.transformToArray(treeObj.getNodes());
			    	var tempNode= node_remove.length;
			    	for (var i=0; i< tempNode; i++) {
						treeObj.removeChildNodes(node_remove[i]);
					}
			    	var treeObj1 = $.fn.zTree.getZTreeObj("organizesTree");
			    	var node_remove1 = treeObj1.transformToArray(treeObj1.getNodes());
			    	var tempNodeo1 = node_remove1.length;
			    	for(var i=0; i< tempNodeo1; i++)
			        {
			    		treeObj1.removeNode(node_remove1[i]);
			    	}
			    	var treeObj = $.fn.zTree.getZTreeObj("organizesTree");
			    	var dataObj=eval("("+orgFlag+")");//转换为json对象 
			    	orgFlag = treeObj.addNodes(null, dataObj);
			    }
			}
          });
	   }
	
	}
	</script>

		<!-- 弹出框 -->
		<div id="popupDialog">
			<form name="updateForm" action="">
				<input type="hidden" id="projMedId" name="projectMedium.proMedID"/>
				<input type="hidden" name="projectMedium.projectID" id="projectID"/>
				<input type="hidden" id="castDetailstatus" name="castDetailstatus" />
				<input type="hidden" id="opflag" name="opflag"
					value="list" />
				<div class="title">

					<table>
						<tr>
							<th align="left">
								当前计划投放的媒体刊例资源：
							</th>
							<th>
								状态变更为：
								<select name="newStatus">
									<option value="1">
										预占
									</option>
									<option value="2">
										呈批中
									</option>
									<option value="3">
										占用
									</option>
									<option value="4">
										完成投放
									</option>
									<option value="5">
										完成结算
									</option>
									<option value="6">
										中止
									</option>
								</select>
							</th>
							<th align="right">
								<a href="#" onclick="gotoAddcast();">增加新投放排期</a>
							</th>
						</tr>
					</table>
				</div>
				<div class="body">
					<div class="content_left" style="float: left;">
						<table id="recordTable">
							<tr>
							     <th style="width: 0px; border-style: none none none none;">
								</th>
								<th style="width: 50px; border-style: none dashed dashed none;">
									序号
								</th>
								<th style="width: 270px; border-style: none dashed dashed none;">
									媒体刊列
								</th>
								<th style="width: 150px; border-style: none dashed dashed none;">
									资源规模(RMB)
								</th>
								<th style="width: 30px; border-style: none dashed dashed none;"></th>
								<th style="width: 30px; border-style: none solid dashed none;"></th>
							</tr>
						</table>
					</div>
					<div id="detail_Med" class="content_right" style="float: left; display: none;">
						<table>
							<tr>
								<th style="width: 140px; border-style: none dashed none none;">
									名称
								</th>
								<th style="width: 140px; border-style: none dashed none none;">
									规格
								</th>
								<th style="width: 140px; border-style: none dashed none none;">
									格式
								</th>
								<th style="width: 140px; border-style: none none none none;">
								           栏目
								</th>
							</tr>
							<tr>
								<td id="value1" style="border-style: none dashed none none;">
									
								</td>
								<td id="value2" style="border-style: none dashed none none;">
									
								</td>
								<td id="value3" style="border-style: none dashed none none;">
									
								</td>
								<td id="value4" style="border-style: none none none none;">
									
								</td>
							</tr>
							<tr>
								<th style="border-style: none dashed none none;">
									版面
								</th>
								<th style="border-style: none dashed none none;">
									位置
								</th>
								<th style="border-style: none dashed none none;">
									刊例价
								</th>
								<th style="border-style: none none none none;">
									投放次数
								</th>
							</tr>
							<tr>
								<td id="value5" style="border-style: none dashed none none;">
									
								</td>
								<td id="value6" style="border-style: none dashed none none;">
									
								</td>
								<td id="value7" style="border-style: none dashed none none;">
									
								</td>
								<td id="value8" style="border-style: none none none none;">
									
								</td>
							</tr>
						</table>
					</div>

				</div>
			</form>
		</div>

		<div id="tr_list" style="visibility: hidden;">
		    <table style="display:none">
				<tr id="record_single">
					<td style="border-style: none none none none;"><input type="checkbox" checked="checked" style="display:none" id="checkId_" name="projMedIds" value=""/></td>
					<td id="number_" style="width: 50px; border-style: none dashed dashed none;"></td>
					<td id="name_" style="width: 270px; border-style: none dashed dashed none;"></td>
					<td id="total_" style="width: 150px; border-style: none dashed dashed none;"></td>
					<td style="width: 30px; border-style: none dashed dashed none;">
						<img id="del_" class="delete" src="images/status/delete.gif"
							name="" />
					</td>
					<td style="width: 30px; border-style: none solid dashed none;">
						<img id="detail_" class="showDetail"
							src="images/status/arrow_right.gif" name="" title=""/>
					</td>
				</tr>
			</table>
		</div>
		<div id="tr_sum" style="visibility: hidden;">
		    <table style="display:none">  
				<tr id="sum_table">
					<td colspan="3" style="border-style: none dashed none none;">
						小计：
					</td>
					<td id="totals" colspan="3"
						style="border-style: none none none none; color: red;"></td>
				</tr>
			</table>
		</div>
	</body>

</html>

